MPI_COMPILE_FLAGS = $(shell mpicc -O3 --showme:compile)
MPI_LINK_FLAGS = $(shell mpicc --showme:link) -lm -fopenmp

CC=gcc-4.2

all: clean sequential parallel


sequential:
	$(CC) $(MPI_COMPILE_FLAGS) sequential.c jacobi.c matrixparser.c $(MPI_LINK_FLAGS) -o sequential


parallel:
	$(CC) $(MPI_COMPILE_FLAGS) parallel.c jacobi.c matrixparser.c $(MPI_LINK_FLAGS) -o parallel

clean:
	/bin/rm -f sequential parallel teste

